package org.example.controller;


import org.example.common.R;
import org.example.pojo.entity.WmChannel;
import org.example.service.IWmChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 频道信息表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-01-26
 */
@CrossOrigin(maxAge = 3600)
@RestController
@RequestMapping("/front")
public class WmChannelController {

    @Autowired
    private IWmChannelService wmChannelService;

    /**
     * 获取频道
     * @return
     */
    @GetMapping("channel")
    public R channel() {
        List<WmChannel> list = wmChannelService.list();
        return R.ok(list);
    }
}
